package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username   string `gorm:"type:varchar(30);comment:账号;"`
	Password   string `gorm:"type:varchar(60);comment:密码;"`
	UserStatus int    `gorm:"type:int(2);comment:用户状态:0未注册，1正常，2冻结;"`
}

func (c *User) FindInIdByUser(id int) error {
	return Db.Where("id", id).Find(&c).Error
}
